//
//  HomeSendCell.m
//  CarUser
//
//  Created by 王森林 on 2019/1/23.
//  Copyright © 2019年 王森林. All rights reserved.
//

#import "HomeSendCell.h"

@interface HomeSendCell()
@property  (nonatomic, strong) NSArray *dataAry;

@end

@implementation HomeSendCell

-  (void)createUIWithData
{
    [self.contentView  removeAllSubviews];
    [self.dataAry enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        
        UIView *functionBGView = [[UIView alloc] initWithFrame:CGRectMake(15, 10+20*idx, (BOUNDWIDTH-30)/2, 15)];
        [self.contentView addSubview:functionBGView];
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10,(15-2)/2 , 2, 2)];
        label.backgroundColor = [UIColor blackColor];
        [functionBGView addSubview:label];
        
        UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, (BOUNDWIDTH-30)/2-20, 15)];
        titleLabel.textColor = Common_TextColor;
        titleLabel.font = FONT_SIZE(13);
        titleLabel.text = [NSString stringWithFormat:@"%@   %@   到达    %@",[obj objectForKey:@"GJ0000"],[obj objectForKey:@"SJ0000"],[obj objectForKey:@"CS0000"]];
        [functionBGView addSubview:titleLabel];
        
    }];
    
}

- (void)setData:(id)data
{
    
    self.dataAry = [NSArray arrayWithArray:data];
    [self createUIWithData];
    
}
@end
